//
//  MKUITabBarItemViewContainer.m
//  MKUI
//
//  Created by sushangjin on 16/3/29.
//  Copyright © 2016年 sushangjin. All rights reserved.
//

#import "MKUITabBarItemContainer.h"
#import "MKUITabBarController.h"
@implementation MKUITabBarItemContainer

- (__kindof UITabBarItem *)selectedItem{
    UITabBarItem *item = nil;
    NSInteger index = self.selectedIndex;
    if(index>=0&&index<self.items.count){
        item = self.items[index];
    }
    return item;
}
- (void)setSelectedItem:(UITabBarItem *)item{
    NSInteger index = [self.items indexOfObject:item];
    self.selectedIndex = index;
}
- (void)setSelectedIndex:(NSInteger)index{
    if(index>=0&&index<self.items.count){
        _selectedIndex = index;
    }
}

- (void)reloadData{
    [self reloadDataWithAnimated:NO];
}
- (void)reloadDataWithAnimated:(BOOL)animated{
    
}
- (void)setSelectedIndex:(NSInteger)index animated:(BOOL)animated{
    self.selectedIndex = index;
    [self reloadDataWithAnimated:animated];
}

- (void)didScrollFromIndex:(NSInteger)fromIndex to:(NSInteger)toIndex withProgress:(CGFloat)progress{
    
}
- (BOOL)contentContainerCanScrollContent{
    return [self.tabBarController.contentContainer canScrollContentView];
}
@end
